package cn.cdeden.resource.domain.bo;

import cn.cdeden.common.core.validate.AddGroup;
import cn.cdeden.common.core.validate.EditGroup;
import cn.cdeden.common.mybatis.core.domain.BaseEntity;
import cn.cdeden.resource.domain.SysOssBarrel;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 对象存储桶配置配置业务对象 sys_oss_barrel
 *
 * @author Yu.
 * @date 2024-12-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysOssBarrel.class, reverseConvertGenerate = false)
public class SysOssBarrelBo extends BaseEntity {

    /**
     * 桶编号主键
     */
    @NotNull(message = "桶编号主键不能为空", groups = { EditGroup.class })
    private Long ossBarrelId;

    /**
     * 配置编号
     */
    @NotNull(message = "配置编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long ossConfigId;

    /**
     * 桶名称
     */
    @NotBlank(message = "桶名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String bucketName;

    /**
     * 前缀
     */
    @NotBlank(message = "前缀不能为空", groups = { AddGroup.class, EditGroup.class })
    private String prefix;

    /**
     * 桶权限类型(0=private 1=public 2=custom)
     */
    @NotBlank(message = "桶权限类型(0=private 1=public 2=custom)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String accessPolicy;

    /**
     * 扩展字段
     */
    @NotBlank(message = "扩展字段不能为空", groups = { AddGroup.class, EditGroup.class })
    private String ext1;

    /**
     * 版本类型(0=OFF 1=Enabled 2=Suspended)
     */
    @NotBlank(message = "版本类型(0=OFF 1=Enabled 2=Suspended)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String versionPolicy;

    /**
     * 库所属模块
     */
    @NotBlank(message = "库所属模块不能为空", groups = { AddGroup.class, EditGroup.class })
    private String moduleType;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
